<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>个人资料</title>
		<link href="__CSS__/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="__CSS__/iconfont.css" />
		<link rel="stylesheet" href="__CSS__/style.css" />
		<link rel="stylesheet" href="__CSS__/mall.css" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" href="JavaScript:history.go(-1)"></a>
			<h1 class="mui-title">个人资料</h1>
		</header>
		<div class="mui-content">
			<div class="gerenzl_nr">
				<form id="myForm" class="mui-input-group gerenzl_group">
					<div class="mui-input-row">
						<label>头像</label>
						<div class="actions" style="float: right;">
							<div class="file-btn" style="border: 1px solid #CCCCCC;">
								<input type="hidden" id="thumb" name="thumb" value="{$model.thumb|default='__IMG__/member.jpg'}">
								<input onchange="UpladFile('member',100)" type="file" accept="image/*" id="file" name="file" multiple>
								<span><img class='img_list' src="{$model.thumb|default='__IMG__/member.jpg'}" id='thumb_img' style="width: 100%;height: 100%;border-radius: 100%" ></span>
							</div>
						</div>
					</div>
					<div class="mui-input-row">
						<label>手机</label>
						<input type="text" readonly value="{$model.mobile}" style="width: 65%;" class="mui-input-group">
					</div>
					<div class="mui-input-row">
						<label>昵称</label>
						<input type="text" name="nick_name" value="{$model.nick_name}" class="mui-input-group" placeholder="请填写昵称">
					</div>
					<div class="hy_line"></div>
					<div class="mui-input-row">
						<label>性别</label>
						<select class="mui-btn mui-btn-block" name="sex">
							<option value="1" {if $model.sex==1}selected{/if}>男</option>
							<option value="2" {if $model.sex==2}selected{/if}>女</option>
						</select>
					</div>
					<div class="mui-input-row">
						<label>地区</label>
						<input type="text" readonly="" placeholder="请选择地区" id="myAddrs" data-key="{$model.area|default=''}" value="">
						<input type="hidden" id="area" name="area" value="{$model.area}" />
					</div>
					<div class="mui-input-row">
						<label>详细地址</label>
						<input type="text" name="address" value="{$model.address}" class="mui-input-group" placeholder="请填写详细地址 ">
					</div>
					<div class="mui-input-row">
						<label>行业：</label> {foreach name='goods' item='vo'}
						<div style="display: inline;margin-right: 30px; ">
							<input type="checkbox" name="fans[]" id="fans{$key}" value="{$vo.id}" {if in_array($vo.id,$model.fans)}checked{/if}/>
							<label for="fans{$key}" style="float: inherit; ">{$vo.name}</label>
						</div>
						{/foreach}
					</div>
					<button type="submit" class="fjysq_sbtn">保存</button>
				</form>
			</div>
		</div>
	</body>

</html>
<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/jquery.validate.min.js"></script>
<script src="__JS__/mui.min.js"></script>
<script src="__LIB__/layer.js"></script>
<script src="__JS__/index.js"></script>
<script src="__JS__/image.zip.js"></script>
<link href="__JS__/scs.min.css" rel="stylesheet">
<script src="__JS__/jquery.scs.min.js"></script>
<script src="__JS__/district.js"></script>
<script type="text/javascript">
	$(function() {
		$("#myForm").validate({
			focusInvalid: true,
			onkeyup: false,
			ignore: "",
			onfocusout: false,
			showErrors: function(errorMap, errorList) {
				var msg = "";
				if(errorList != null && errorList != "") {
					msg = errorList[0]['message'];
					layer.msg(msg);
				}
			},
			submitHandler: function(form) {
				// ajax提交
				app.ajax();
			},
			rules: {
				nick_name: {
					required: true
				},
				'fans[]': {
					required: true
				},
				area: {
					required: true
				},
				address: {
					required: true
				}
			},
			messages: {
				nick_name: {
					required: "请填写昵称 "
				},
				'fans[]': {
					required: "请至少选择一个行业"
				},
				area: {
					required: "请选择地区"
				},
				address: {
					required: "请填写详细地址"
				}
			}
		});
	});
</script>